import { stringify } from 'qs';
import request from '../utils/request';

export async function saveOrUpdateLottery(params) {
  return request(
    `/api/web/interactiveLottery/saveOrUpdateLottery?${stringify(params)}`,{
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}

export async function listAndSaveLotteryResult(params) {
  return request(
    `/api/web/lotteryResult/listAndSaveLotteryResult?${stringify(params)}`,{
      method: 'POST',
      body: {
        ...params,
        method: 'post',
      },
    });
}

export async function listLotteryHistory(params) {
  return request(`/api/web/interactiveLottery/listLotteryHistory?${stringify(params)}`);
}

export async function deleteLottery(params) {
  return request(`/api/web/interactiveLottery/deleteLottery?${stringify(params)}`);
}

export async function getLotteryInfoById(params) {
  return request(`/api/web/interactiveLottery/getLotteryInfoById?${stringify(params)}`);
}

export async function listLotteryResultById(params) {
  return request(`/api/web/lotteryResult/listLotteryResultById?${stringify(params)}`);
}

export async function informWinUser(params) {
  return request(`/api/web/lotteryResult/informWinUser?${stringify(params)}`);
}

